<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录</title>
    <link rel="icon" href="img/favicon.gif" type="image/gif" />
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/login.css">
    <script>
    function init(){
        document.getElementById("btn_cookieShow").addEventListener("click",()=>{
            let node=document.getElementsByClassName("cookieSelect")[0];
            if(node.hidden==true){
                node.hidden=false;
                document.getElementById("btn_cookieShow").classList.add("change");
            }else{
                node.hidden=true; 
                document.getElementById("btn_cookieShow").classList.remove("change");
            }
        },false);
    }
    window.addEventListener("load",init,false);
    </script>
</head>
<body>
    <article class="login_article">
        <aside class="img_box"></aside>
        <aside class="login_article_image">
            <img src="img/login_logo.jpg" title="logo">
            <div class="errorMsg">用户名或密码错误！</div>
        </aside>
        <section>
        <fieldset>
            <legend hidden>用户登录</legend>
            <form action="#" method="get">
                <label for="userName">用户名：</label>
                <input type="text" name="userName" id="userName" placeholder="请输入用户名"><br>
                <label for="password">密&nbsp;&nbsp;&nbsp;码：</label>
                <input type="password" name="password" id="password" placeholder="请输入密码"><br>
                <aside class="cookieGroup">
                    <div id="btn_cookieShow"></div>
                    <div hidden class="cookieSelect">
                        <input type="checkbox" name="isCookie" value="yes" id="isCookie">
                        <label for="isCookie">
                            <span style="vertical-align:2px;">一周之内不需要登录</span>
                        </label>
                    </div>
                </aside>
                <nav class="buttonGroup">
                    <button class="normal_btn" id="btn_register" type="submit" formaction="register.html" formmethod="get">注册</button>
                    <button class="normal_btn" id="btn_login" type="submit">登录</button>
                </nav>
            </form>
        </fieldset>
        </section>
    </article>
</body>
</html>